package com.msr.service;

import com.msr.bean.Food;
import com.msr.mapper.FoodMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author tom
 * @version V1.0
 * @Package com.msr.service
 * @date 2024/1/12 9:54
 * @Copyright © 株式会社多言语系统研究所
 */
@Service
public class FoodServiceImpl implements FoodService{
    @Autowired
    private FoodMapper foodMapper;

    @Override
    public List<Food> foodAll(Food food) {
        return foodMapper.foodAll(food);
    }

    @Override
    public int totalSize(Food food) {
        return foodMapper.totalSize(food);
    }

    @Override
    public List<Food> foodAllPage(Map<String, Object> map) {
        return foodMapper.foodAllPage(map);
    }

    @Override
    public int addFood(Food food) {
        return foodMapper.addFood(food);
    }

    @Override
    public Food findFoodById(int foodId) {
        return foodMapper.findFoodById(foodId);
    }

    @Override
    public int updateFood(Food food) {
        return foodMapper.updateFood(food);
    }

    @Override
    public int delFood(int id) {
        return foodMapper.delFood(id);
    }
}
